<?php 
//Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl.'/js/app/accounting.js',CClientScript::POS_END);
$customerData = json_encode($location->customer->attributes);
Yii::app()->clientScript->registerScript('Custno',"
customer = $customerData;",  CClientScript::POS_HEAD); 
Yii::app()->clientScript->registerScript('info',
        <<<HERE
        var custno='$location->custno';
        var locno='$location->locno';
HERE
        ,CClientScript::POS_HEAD);
        
?>
<?php Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . '/js/app/customerAccounting.js', CClientScript::POS_BEGIN); ?>
<div id="left-col">
    <?php
    $this->renderPartial('_side', array(
        'location' => $location,
        'customer'=>$location->customer        
    ));
    ?>



</div>

<div id="right-col">

    <div class="wrap">
        <div class="container">


            <div id="breadcrumb" style="display:none;"><span style="padding-left:10px;font-size:10px;color:#777777;" id="alsoviewing"></span></div>
            <div class="inside">

                <?php
                $this->renderPartial('/locations/_view', array(
                    'location' => $location,
                ));
                ?>

                <?php
                $this->renderPartial('/locations/_tab', array(
                    'model' => $location,
                ));
                ?>
                <br/>
                

 <div id="accounting">

                    <div class="form">
                    
                        <div class ="row">
                            <label>Type</label>
                            <?php
                            $data = array(
                                         1=>    'Invoices',
                                         2=>  'Credit Memos',
					   3=>'Job : Sales Orders'
                            );
                            echo CHtml::dropDownList('type', '', $data);
                            ?>
                         
                            
                        </div>
                      
                    </div>
                    <div id="accounting-list"></div>
                     <div id="accounting-inv-list"></div>
                </div>

            </div><!-- inside -->
        </div><!-- container -->
    </div><!-- wrap -->
<?php $this->renderPartial('/copyright'); ?>
</div> <!-- left-col -->
